export default function (inputString) {
    const headings = [];
    const regex = /<h([1-6])>(.*?)<\/h\1>/g;
    let match;

    while ((match = regex.exec(inputString)) !== null) {
        const level = match[1];
        const content = match[2];
        headings.push({level: level, content: content});
    }

    //创建目录容器
    const catalogueBody = document.createElement('div')

    for (let i = 0; i < headings.length; i++) {


    }

    return headings;
}

